package com.wn.equipment;

import com.wn.entity.InventoryBookkeeping;
import com.wn.entity.Material;
import com.wn.entity.ProductInWarehouseApplication;
import com.wn.entity.ReturnInWarehouseApplication;
import com.wn.equipment.mapper.StatisticsQueryMapper;
import com.wn.equipment.service.StatisticsQueryService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * @author zhairenhao
 * @date 2022/10/21 23:08
 * @description
 */
@SpringBootTest
public class StatistivsQueryTset {
    @Autowired
    StatisticsQueryService statisticsQueryService;

    @Autowired
    StatisticsQueryMapper statisticsQueryMapper;

    @Test
    public void getSome(){
        Material material = new Material();
        material.setMaterialNumber(1);
        System.out.println(statisticsQueryService.getProductInWarehouseByMaterialNumberId(material));
    }

    @Test
    public void getSome2(){
        Material material = new Material();
        material.setMaterialNumber(2);
        System.out.println(statisticsQueryMapper.getPurchaseInWarehouseByMaterialNumberId(material));
    }

    @Test
    public void getSome3(){
        InventoryBookkeeping inventoryBookkeeping = new InventoryBookkeeping();
        inventoryBookkeeping.setWorkOrderNumber("2");
        System.out.println(statisticsQueryMapper.getInspectionInWarehouseByCondition(inventoryBookkeeping));
    }

    @Test
    public void getSome4(){
        InventoryBookkeeping inventoryBookkeeping = new InventoryBookkeeping();
        inventoryBookkeeping.setId(1);
        System.out.println(statisticsQueryMapper.getReturnInWarehouseByInventoryBookkeepingId(inventoryBookkeeping));
    }

    @Test
    public void getSome5(){
        InventoryBookkeeping inventoryBookkeeping = new InventoryBookkeeping();
        inventoryBookkeeping.setId(2);
        System.out.println(statisticsQueryMapper.getOutWarehouseByInventoryBookkeepingId(inventoryBookkeeping));
    }

    @Test
    public void getSome6(){
        InventoryBookkeeping inventoryBookkeeping = new InventoryBookkeeping();
        inventoryBookkeeping.setId(3);
        System.out.println(statisticsQueryMapper.getBorrowWarehouseByInventoryBookkeepingId(inventoryBookkeeping));
    }
}
